home *** CD-ROM | disk | FTP | other *** search
- /*@@ Wedit generated application. Written Sun Jun 13 11:59:27 1999
- @@header: d:\crackmes\idcrkme60\idcrkme60res.h
- @@resources: d:\crackmes\idcrkme60\idcrkme60.rc
- Do not edit outside the indicated areas */
- /*<---------------------------------------------------------------------->*/
- /*<---------------------------------------------------------------------->*/
- #include <windows.h>
- #include <windowsx.h>
- #include <commctrl.h>
- #include <string.h>
- #include "d:\crackmes\idcrkme60\idcrkme60res.h"
- #include "d:\crackmes\idcrkme60\ezfont.h"
- /* --- The following code comes from C:\lcc\lib\wizard\dlgbased.tpl. */
- /*<---------------------------------------------------------------------->*/
-
- /*
- Template for a dialog based application. The main procedure for this
- template is the DialogFunc below. Modify it to suit your needs.
- */
- /* prototype for the dialog box function. */
- static BOOL CALLBACK DialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static BOOL CALLBACK AboutProc (HWND hwndDialog, UINT msg, WPARAM wParam, LPARAM lParam);
- static BOOL CALLBACK RequestProc (HWND hwndDialog, UINT msg, WPARAM wParam, LPARAM lParam);
- /*
- Win main just registers a class of the same type that the dialog class, and
- then calls DialogBox. Then it exits. The return value is the return value of
- the dialog procedure.
- */
-
- int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nCmdShow)
- {
- WNDCLASS wc;
-
- memset(&wc,0,sizeof(wc));
- wc.lpfnWndProc = DefDlgProc;
- wc.cbWndExtra = DLGWINDOWEXTRA;
- wc.hInstance = hinst;
- wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(MAINICON));
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
- wc.lpszClassName = "idcrkme60";
- RegisterClass(&wc);
-
- return DialogBox(hinst, MAKEINTRESOURCE(IDD_MAINDIALOG), NULL, (DLGPROC) DialogFunc);
-
- }
-
- /*
- You should add your initialization code here. This function will be called
- when the dialog box receives the WM_INITDIALOG message.
- */
- static int InitializeApp(HWND hDlg,WPARAM wParam, LPARAM lParam)
- {
- return 1;
- }
-
- /*
- This is the main function for the dialog. It handles all messages. Do what your
- application needs to do here.
- */
- static BOOL CALLBACK DialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
- {
- HINSTANCE hinst;
- BOOL FullVersion = FALSE;
-
- switch (msg) {
- /* This message means the dialog is started but not yet visible.
- Do All initializations here
- */
- case WM_INITDIALOG:
- if (!FullVersion) EnableWindow(GetDlgItem(hwndDlg, IDREQUEST), FALSE);
- InitializeApp(hwndDlg,wParam,lParam);
- return TRUE;
- /* By default, IDOK means close this dialog returning 1, IDCANCEL means
- close this dialog returning zero
- */
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDOK:
- EndDialog(hwndDlg,1);
- return 1;
- case IDCANCEL:
- EndDialog(hwndDlg,0);
- return 1;
- case IDABOUT:
- DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTDIALOG), hwndDlg, (DLGPROC) AboutProc);
- return 1;
- case IDREQUEST:
- if (!FullVersion) {EnableWindow(GetDlgItem(hwndDlg, IDREQUEST), FALSE); return -1;}
- DialogBox(hinst, MAKEINTRESOURCE(IDD_REQUESTDIALOG), hwndDlg, (DLGPROC) RequestProc);
- }
- break;
- /* By default, WM_CLOSE is equivalent to CANCEL */
- case WM_CLOSE:
- EndDialog(hwndDlg,0);
- return TRUE;
-
- }
- return FALSE;
- }
-
- static BOOL CALLBACK AboutProc (HWND hwndDialog, UINT msg, WPARAM wParam, LPARAM lParam)
- {
-
- static HWND hName;
- static HWND hAboutText;
- static HFONT hFontName;
- static HDC hDCName;
- static char szAboutText[] = "If you need help on cracking this CrackMe, visit "
- "http://disc.server.com/discussion.cgi?id=42877\r\n"
- "\r\n"
- "Please post the questions there and don't mail me, since I won't answer any E-Mailed question regarding this CrackMe!\r\n"
- "\r\n"
- "\r\n"
- "Special thanks:\r\n"
- "MiZ [RefleXZ]\r\n"
- "LUCIFER48\r\n"
- "\r\n"
- "\r\n"
- "Thanks and greetings (no particular order):\r\n"
- "+MaLaTTiA, alpine, Borna, Crackz, DnNuke, epxy, Eternal Bliss, Fravia, gAnZ, HarvestR, Iczelion, Jeff, LaZaRuS, Lord Soth, LUCIFER48, McCodEMaN, MiZ, OkStart, NiKai, pruri, Rhayader, Santa Clawz, tC, The Sandman, Vladimir, Volatility, WKT Group, Xomgromit\r\n"
- "\r\n" "\r\n"
- " \"There's always one way to crack a target - just think a bit!\""
- "\r\n"
- " TORN@DO\r\n"
- " \0 ";
-
- switch (msg)
- {
-
- case WM_INITDIALOG:
- hAboutText = GetDlgItem(hwndDialog, 1008);
- hName = GetDlgItem(hwndDialog, 1007);
- hDCName = GetDC(hName);
- hFontName = EzCreateFont (hDCName, "Impact", 240, 0, EZ_ATTR_BOLD, TRUE);
- SelectObject (hDCName, hFontName);
- SendMessage(hName, WM_SETFONT, (WPARAM) hFontName, MAKELPARAM(TRUE, 0));
-
- SetWindowText(hAboutText, szAboutText);
-
- return FALSE ;
-
- case WM_COMMAND :
- switch (LOWORD (wParam))
- {
- case IDOK :
- case IDCANCEL :
- EndDialog(hwndDialog,0);
- break;
- }
-
- case WM_DESTROY:
- DeleteObject(hFontName);
- return FALSE ;
-
- }
- return FALSE ;
- }
-
-
- static BOOL CALLBACK RequestProc (HWND hwndDialog, UINT msg, WPARAM wParam, LPARAM lParam)
- {
- static HWND hName;
- static HFONT hFontName;
- static HDC hDCName;
-
- switch (msg)
- {
-
- case WM_INITDIALOG:
- hName = GetDlgItem(hwndDialog, 1013);
- hDCName = GetDC(hName);
- hFontName = EzCreateFont(hDCName, "MS Sans Serif", 12, 0, EZ_ATTR_BOLD, TRUE);
- SelectObject (hDCName, hFontName);
- SendMessage(hName, WM_SETFONT, (WPARAM) hFontName, MAKELPARAM(TRUE, 0));
-
- return FALSE ;
-
- case WM_COMMAND :
- switch (LOWORD (wParam))
- {
- case IDOK :
- case IDCANCEL :
- EndDialog(hwndDialog,0);
- break;
- }
-
- case WM_DESTROY:
- return FALSE ;
- }
-
- return FALSE ;
- }
-